package com.flymobi.service;

import java.util.List;

import com.flymobi.fw.modules.CommonService;
import com.flymobi.po.CityCode;
import com.flymobi.util.QL;

public class CityCodeService extends CommonService {

	public List<CityCode> list(int startRow, int pagePerSize) {
		return dao.find(CityCode.class, QL.HQL.CityCode.LIST, new Object[] {},
				startRow, pagePerSize);
	}
	
	public CityCode find(String name) {
		return dao.findSingle(CityCode.class, QL.HQL.CityCode.FIND, new Object[] {name});
	}

	public Long getCount() {
		return dao.getCount(QL.HQL.CityCode.GET_COUNT, new Object[] {});
	}

	public void save(CityCode CityCode) {
		dao.save(CityCode);
	}

	public CityCode load(String id) {
		return dao.load(CityCode.class, new Long(id));
	}

	public CityCode get(String id) {
		return dao.get(CityCode.class, new Long(id));
	}

	public void delete(String id) {
		dao.delete(this.get(id));
	}
}
